home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 50
/
Volume 50 - JOGO DISK .iso
/
Games
/
mallcrawl.swf
/
scripts
/
DefineSprite_905
/
frame_1
/
DoAction.as
Wrap
Text File
|
2007-09-28
|
2KB
|
92 lines
function addScore(count)
{
this.score += count;
this.score = Math.round(this.score);
}
function setLevel()
{
var _loc3_ = undefined;
switch(_global.MallCrawl.level)
{
case 1:
_loc3_ = "one";
break;
case 2:
_loc3_ = "two";
break;
case 3:
_loc3_ = "three";
}
this.LevelDisplay.gotoAndStop(_loc3_);
}
function setLives(count)
{
this.lives = count;
var _loc2_ = 1;
while(_loc2_ < 4)
{
this["Life" + _loc2_].gotoAndStop("off");
_loc2_ = _loc2_ + 1;
}
_loc2_ = 1;
while(_loc2_ < this.lives + 1)
{
this["Life" + _loc2_].gotoAndStop("on");
_loc2_ = _loc2_ + 1;
}
}
function setScore(count)
{
this.score = count;
}
function setTimer(count)
{
this.time = count;
}
function timeDown()
{
if(!_global.MallCrawl.paused)
{
if(this.time > 0)
{
var _loc4_ = Math.floor(this.time / 60);
String(_loc4_).length != 1 ? null : (_loc4_ = "0" + _loc4_);
var _loc3_ = this.time % 60;
String(_loc3_).length != 1 ? null : (_loc3_ = "0" + _loc3_);
this.time = this.time - 1;
time_readable = _loc4_ + ":" + _loc3_;
}
else
{
time_readable = "00:00";
_global.MallCrawl.outOfTime();
}
}
}
function startTimer()
{
this.interval_id = setInterval(this,"timeDown",1000);
}
function stopTimer()
{
clearInterval(this.interval_id);
}
_global.Footer = this;
var lives;
var score;
var time;
var interval_id;
_global.MallCrawl.lostLevel();
this.onEnterFrame = function()
{
if(score_readable + 5 < this.score)
{
score_readable += 5;
}
else
{
score_readable = this.score;
}
};
music_txt = "MUSIC " + String(_global.Music.state).toUpperCase();